<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>资金流水记录</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  
    {include file="public/css"}
    {include file="public/js"}
</head>
<body>

<!-- 后台面包屑导航 -->
{:get_admin_breadcrumb()}

<blockquote class="layui-elem-quote">资金记录一般不建议随便删除。以免影响财务统计
<br>提现审核成功、充值成功、资金交易成功，都会在资金记录里面产生一条记录</blockquote>
<!-- 搜索表单 -->
{:create_search_form("",$keywordsData,$customSingleField,$groupData,$dateData,$orderData)}


<div class="layui-form">
  <table class="layui-table" id="demo">
    <colgroup>
      <col width="50">
      <col width="100">
      <col width="110">
      <col>
    </colgroup>
    <thead>

      <tr>
        <th><input type="checkbox"  id="selectAll"  lay-skin="primary" lay-filter="selectAll"></th>
        <th>流水号</th>
        <th>用户名</th>
        <th>收入</th>
        <th>支出</th>
        <th>余额</th>
        <th>支付方式</th> 
        <th>创建时间</th>
        <th>操作人</th>
        <th>备注</th>
        <th>状态</th>
      </tr> 
    </thead>
    <tbody>

{volist name='list' id='vo'}
      <tr>
        <td>{if $vo.status !=1 || $Think.session.admin_uid ==1}<input type="checkbox" name="id[]" class="id " title=""  lay-skin="primary" value="{$vo.id}">{/if}</td>
        <td>{$vo.id}</td>
        <td><a href="javascript:open('{:url("user/show",array("username"=>$vo["username"]))}','查看用户信息');" >{$vo.username}</a></td>
        <td ><span class="orange">{if $vo.amount > 0 }+{$vo.amount|number_format="2"}{/if}</span></td>
        <td>{if $vo.amount < 0 }{$vo.amount|number_format="2"}{/if}</td>
        <td class="orange">¥ {$vo.balance}</td>
        <td>{$vo.bankname}</td>
        <td>{if $vo.create_time}{$vo.create_time|date="Y-m-d H:i:s"}{else}<p style="text-align:center">--</p>{/if}</td>
        <td>{if $vo.editor}{$vo.editor}{else}<p style="text-align:center">--</p>{/if}</td>
        <td>{$vo.remark}</td>
        <td><span class="layui-badge layui-bg-blue">成功</span></td>
      </tr>
{/volist}

    </tbody>
  </table>
<!-- 搜索为空显示 -->
{if empty($list)}
 <div class="layui-form-item">
    <div class="empty">
     <div class="img"></div>
     <p>暂无内容</p></div>
 </div>
</div>
{/if}


</div>

<div id="pages">{$page|raw}</div>

<div class="layui-btn-group demoTable">

  <button class="layui-btn layui-btn-primary" id="del" data-type="getCheckData"> <i class="layui-icon">&#xe640;</i> 批量删除</button>
</div>

<script>
$(function(){
//全选删除
      var id = [];
      $("#del").click(function(){
            $(".id").each(function() {
            if(this.checked == true){
                 id.push($(this).val()); 
            }
            });              
       if(id.length == 0){
          parent.layer.alert('你没有选中任何记录',{title:'批量删除提示'});
       }else{

                    //询问框
              parent.layer.confirm('您确定要批量删除吗？财务流水不建议删除!以免影响统计', {
              btn: ['确定','取消'],
              title:'财务流水删除提示' //按钮
            }, function(index){
             //确定
                layer.close(index);
                             $.post("{:url('financeRecord/del')}"
                        ,{"id":id}        
                       ,function(json){
                        if(json.code == 0){
                          parent.layer.close(index);
                            layer.msg(json.msg);
                                 setTimeout(function(){ 
                                 window.location.reload();  //页面刷新
                                 },1000);
                             }

                    });

            }, function(){

            });

       }
  });



});

</script>
</body>

</html>